<template>
  <div class="demo-title">radio/demo3</div>
  <div class="demo">
    <RadioGroup v-model="value">
      <Radio label="1">
        Single option 1
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <img :src="checkedPng" style="width: 19px; height: 19px; margin-left: 1px;"/>
        </template>
      </Radio>
      <Radio label="2" class="radio2">
        Single option 2
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
    </RadioGroup>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import { Radio, RadioGroup, checkedPng } from '@sscd-mobile/radio'
  import Icon from '@sscd-mobile/icon'
  const value = ref('1')
</script>

<style scoped>
  .demo {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    .radio2 {
      margin-top: 12px;
    }
  }
</style>
